// This file was decompiled using VCSCM.ini published on 2021-01-30
{$CLEO .cs}

03A4: script_name 'RACE' 

:RACE_10
0001: wait 0 ms 
00D6: if 
8248:   not model #PCJ600 available 
004D: jump_if_false @RACE_35 
0247: request_model #PCJ600 

:RACE_35
00D6: if and
816B:   not fading 
8118:   not actor $player_actor dead 
0256:   player 0 defined 
80DF:   not actor $player_actor in_any_car 
0ADC:   test_cheat "RACE" 
0248:   model #PCJ600 available 
0038:   $onmission == 0 // $ == int 
004D: jump_if_false @RACE_89 
0002: jump @RACE_96 

:RACE_89
0002: jump @RACE_10 

:RACE_96
0001: wait 0 ms 
01B4: set_player $player_char can_move 0 
0ACB: show_styled_text "MG Race" time 2000 style 2 
0169: set_fade_color 0 0 1 
016A: fade 0 2000 ms 
0001: wait 3000 ms 
0004: $onmission = 1 // $ = int 
00A5: 0@ = create_car #PCJ600 at 420.9765 680.8195 11.2336 
0175: set_car 0@ z_angle_to 357.5596 
00A5: 1@ = create_car #PCJ600 at 418.3351 681.0764 11.2336 
0175: set_car 1@ z_angle_to 357.5596 
036A: put_actor $player_actor in_car 0@ 
0560: create_random_actor_in_vehicle 1@ in_driverseat_handle_as 2@ 
00AF: set_car 1@ driver_behaviour_to 0 
0373: set_camera_directly_behind_player 
02EB: restore_camera_with_jumpcut 
0169: set_fade_color 0 0 1 
0001: wait 1000 ms 
02EB: restore_camera_with_jumpcut 
016A: fade 1 2000 ms 
0001: wait 3000 ms 
0ACB: show_styled_text "3" time 2000 style 4 
018C: play_sound 1 at 420.9765 680.8195 11.2336 
0001: wait 1000 ms 
0ACB: show_styled_text "2" time 2000 style 4 
018C: play_sound 1 at 420.9765 680.8195 11.2336 
0001: wait 1000 ms 
0ACB: show_styled_text "1" time 2000 style 4 
018C: play_sound 1 at 420.9765 680.8195 11.2336 
0001: wait 1000 ms 
0ACB: show_styled_text "GO!" time 500 style 4 
01B4: set_player $player_char can_move 1 
018C: play_sound 10 at 420.9765 680.8195 11.2336 
00AE: set_vehicle 1@ traffic_behavior_to 2 
00A8: set_car 1@ to_psycho_driver 
00AD: set_car 1@ max_speed_to 80.0 
0423: car 1@ improve_handling 3.0 
00A7: car 1@ drive_to -479.8008 708.4246 11.0163 
0006: 4@ = 10 // @ = int 
0007: 5@ = 426.8781 // @ = float 
0007: 6@ = 857.1368 // @ = float 
0007: 7@ = 11.2336 // @ = float 
0006: 8@ = 1 // @ = int 
018A: 3@ = create_checkpoint_at 5@ 6@ 7@ 
0165: set_marker 3@ color_to 4 
0186: $2139 = create_marker_above_car 1@ 
0165: set_marker $2139 color_to 1 

:RACE_542
0001: wait 0 ms 
00D6: if and
00DB:   actor 2@ in_car 1@ 
81AD:   not car 1@ sphere 0 near_point -479.8008 708.4246 radius 3.0 3.0 
01C1:   car 1@ stopped 
004D: jump_if_false @RACE_617 
00A7: car 1@ drive_to -479.8008 708.4246 11.0163 

:RACE_617
00D6: if 
0119:   car 0@ wrecked 
004D: jump_if_false @RACE_668 
0ACD: show_text_highpriority "~r~Your bike wrecked." time 4000 
0002: jump @RACE_2054 

:RACE_668
00D6: if 
02BF:   car 1@ sunk 
004D: jump_if_false @RACE_747 
0407: create_coordinate 10@ 11@ 12@ from_car 1@ offset 0.0 0.0 0.0 
02C1: set 13@ 14@ 15@ to_car_path_coords_closest_to 10@ 11@ 12@ 
00AB: put_car 1@ at 13@ 14@ 15@ 

:RACE_747
00D6: if and
0119:   car 1@ wrecked 
82BF:   not car 1@ sunk 
004D: jump_if_false @RACE_804 
0ACD: show_text_highpriority "~r~NPC's bike wrecked." time 4000 
0002: jump @RACE_2054 

:RACE_804
00D6: if 
0118:   actor 2@ dead 
004D: jump_if_false @RACE_846 
0ACD: show_text_highpriority "~r~NPC dead." time 4000 
0002: jump @RACE_2054 

:RACE_846
00D6: if 
8256:   not player 0 defined 
004D: jump_if_false @RACE_868 
0002: jump @RACE_2054 

:RACE_868
00D6: if and
8119:   not car 1@ wrecked 
8118:   not actor 2@ dead 
00DB:   actor 2@ in_car 1@ 
01AD:   car 1@ sphere 0 near_point -479.8008 708.4246 radius 3.0 3.0 
004D: jump_if_false @RACE_950 
0ACD: show_text_highpriority "~r~You lose." time 4000 
0002: jump @RACE_2054 

:RACE_950
00D6: if 
0039:   8@ == 11 // @ == int 
004D: jump_if_false @RACE_1002 
04D5: create_corona_at 5@ 6@ 7@ radius 5.5 type 6 flare 0 RGB 150 0 0 
0002: jump @RACE_1030 

:RACE_1002
04D5: create_corona_at 5@ 6@ 7@ radius 5.0 type 6 flare 0 RGB 150 150 0 

:RACE_1030
00D6: if and
01AD:   car 0@ sphere 0 near_point 5@ 6@ radius 7@ 3.0 
00DB:   actor $player_actor in_car 0@ 
004D: jump_if_false @RACE_1663 
00D6: if 
0039:   8@ == 11 // @ == int 
004D: jump_if_false @RACE_1108 
018C: play_sound 1 at 5@ 6@ 7@ 
0002: jump @RACE_1917 

:RACE_1108
0164: disable_marker 3@ 
000A: 8@ += 1 // @ += int 
018C: play_sound 1 at 5@ 6@ 7@ 
0001: wait 10 ms 
00D6: if 
0039:   8@ == 2 // @ == int 
004D: jump_if_false @RACE_1185 
0007: 5@ = 323.2164 // @ = float 
0007: 6@ = 953.3143 // @ = float 
0007: 7@ = 19.2116 // @ = float 

:RACE_1185
00D6: if 
0039:   8@ == 3 // @ == int 
004D: jump_if_false @RACE_1233 
0007: 5@ = 93.7081 // @ = float 
0007: 6@ = 1012.322 // @ = float 
0007: 7@ = 10.8378 // @ = float 

:RACE_1233
00D6: if 
0039:   8@ == 4 // @ == int 
004D: jump_if_false @RACE_1281 
0007: 5@ = -100.2062 // @ = float 
0007: 6@ = 1070.409 // @ = float 
0007: 7@ = 10.8905 // @ = float 

:RACE_1281
00D6: if 
0039:   8@ == 5 // @ == int 
004D: jump_if_false @RACE_1329 
0007: 5@ = -454.3205 // @ = float 
0007: 6@ = 1098.103 // @ = float 
0007: 7@ = 10.9005 // @ = float 

:RACE_1329
00D6: if 
0039:   8@ == 6 // @ == int 
004D: jump_if_false @RACE_1377 
0007: 5@ = -687.4804 // @ = float 
0007: 6@ = 1117.731 // @ = float 
0007: 7@ = 11.2618 // @ = float 

:RACE_1377
00D6: if 
0039:   8@ == 7 // @ == int 
004D: jump_if_false @RACE_1425 
0007: 5@ = -673.9901 // @ = float 
0007: 6@ = 932.9801 // @ = float 
0007: 7@ = 11.2492 // @ = float 

:RACE_1425
00D6: if 
0039:   8@ == 8 // @ == int 
004D: jump_if_false @RACE_1473 
0007: 5@ = -674.7795 // @ = float 
0007: 6@ = 848.0707 // @ = float 
0007: 7@ = 11.2629 // @ = float 

:RACE_1473
00D6: if 
0039:   8@ == 9 // @ == int 
004D: jump_if_false @RACE_1521 
0007: 5@ = -645.4579 // @ = float 
0007: 6@ = 743.729 // @ = float 
0007: 7@ = 11.4046 // @ = float 

:RACE_1521
00D6: if 
0039:   8@ == 10 // @ == int 
004D: jump_if_false @RACE_1569 
0007: 5@ = -543.7177 // @ = float 
0007: 6@ = 741.7087 // @ = float 
0007: 7@ = 11.4156 // @ = float 

:RACE_1569
00D6: if 
0039:   8@ == 11 // @ == int 
004D: jump_if_false @RACE_1617 
0007: 5@ = -479.8008 // @ = float 
0007: 6@ = 708.4246 // @ = float 
0007: 7@ = 11.0163 // @ = float 

:RACE_1617
018A: 3@ = create_checkpoint_at 5@ 6@ 7@ 
0165: set_marker 3@ color_to 4 
00D6: if 
0039:   8@ == 11 // @ == int 
004D: jump_if_false @RACE_1663 
0165: set_marker 3@ color_to 0 

:RACE_1663
00D6: if 
80DB:   not actor $player_actor in_car 0@ 
004D: jump_if_false @RACE_1828 
0AD1: show_formatted_text_highpriority "You have ~r~%i ~h~seconds to get back to the bike." time 1100 4@ 
0001: wait 1000 ms 
00D6: if and
80DB:   not actor $player_actor in_car 0@ 
0039:   4@ == 0 // @ == int 
004D: jump_if_false @RACE_1781 
0002: jump @RACE_2054 

:RACE_1781
000A: 4@ += -1 // @ += int 
00D6: if and
8039:   not  4@ == 10 // @ == int 
0039:   9@ == 0 // @ == int 
004D: jump_if_false @RACE_1828 
0186: 9@ = create_marker_above_car 0@ 
0165: set_marker 9@ color_to 2 

:RACE_1828
00D6: if and
8039:   not  4@ == 10 // @ == int 
00DB:   actor $player_actor in_car 0@ 
004D: jump_if_false @RACE_1873 
0164: disable_marker 9@ 
0006: 9@ = 0 // @ = int 
0006: 4@ = 10 // @ = int 

:RACE_1873
00D6: if and
8119:   not car 1@ wrecked 
8118:   not actor 2@ dead 
80DB:   not actor 2@ in_car 1@ 
004D: jump_if_false @RACE_1910 
036A: put_actor 2@ in_car 1@ 

:RACE_1910
0002: jump @RACE_542 

:RACE_1917
0001: wait 0 ms 
00D6: if 
8039:   not  9@ == 0 // @ == int 
004D: jump_if_false @RACE_1944 
0164: disable_marker 9@ 

:RACE_1944
0164: disable_marker $2139 
0164: disable_marker 3@ 
00D6: if and
8118:   not actor 2@ dead 
8119:   not car 1@ wrecked 
00DB:   actor 2@ in_car 1@ 
004D: jump_if_false @RACE_1990 
00AF: set_car 1@ driver_behaviour_to 1 

:RACE_1990
01C2: mark_actor_as_no_longer_needed 2@ 
01C3: mark_car_as_no_longer_needed 1@ 
01C3: mark_car_as_no_longer_needed 0@ 
0394: play_music 1 
0109: player $player_char money += 10000 
01E3: text_1number_styled 'M_PASS' number 10000 time 4000 style 1  // ??CC? ?PO??E?A! $~1~
0110: clear_player $player_char wanted_level 
0004: $onmission = 0 // $ = int 
0002: jump @RACE_10 

:RACE_2054
0001: wait 0 ms 
00D6: if 
8039:   not  9@ == 0 // @ == int 
004D: jump_if_false @RACE_2081 
0164: disable_marker 9@ 

:RACE_2081
0004: $onmission = 0 // $ = int 
0164: disable_marker $2139 
0164: disable_marker 3@ 
00D6: if and
8118:   not actor 2@ dead 
8119:   not car 1@ wrecked 
00DB:   actor 2@ in_car 1@ 
004D: jump_if_false @RACE_2134 
00AF: set_car 1@ driver_behaviour_to 1 

:RACE_2134
01C2: mark_actor_as_no_longer_needed 2@ 
01C3: mark_car_as_no_longer_needed 1@ 
01C3: mark_car_as_no_longer_needed 0@ 
0217: text_styled 'M_FAIL' time 4000 style 1  // ??CC? ?POA?E?A!
0002: jump @RACE_10 
